The demand for high-quality hinted fonts is outstripping the ability of digital typography houses to produce them. Hinting is a painstaking manual process that can only be done well by a handful of highly skilled professionals. It requires a blend of typographical artistry with technological ability. In order to provide a full appreciation of the hinting problem, a review of how digital fonts are scan-converted onto a raster display is given.
In digital typography, each character in a font is described by a set of outlines, usually represented by splines. When the character is rendered onto a grid of pixels, the outlines are scaled to the desired size, and then each pixel whose center lies inside of an outline is set to black. When fonts are displayed at sufficiently high resolutions, this approach works beautifully. But for sizes below about 150 ppem, severe aliasing problems can result when this naive outline filling process is applied, especially for delicate features such as serifs. As an aside, hinters express font sizes in pixels per em, or ppem. This measure counts the number of device pixels in the em of the font. In traditional typography, the em of a font was the height of the metal block of type. With digital typography, there is no actual metal block to measure, but the digital outlines are still expressed in coordinates relative to this hypothetical size. The point size of text refers to the size of its em expressed in points (a point is 1/72 of an inch). Thus, “12-point text” would correspond to 12 ppem on a 72 dpi screen, or 100 ppem on a 600 dpi printer.
FIG. 1 shows an example of the aliasing problems that can result when a naive outline filling process is applied. Consider the leftmost image 100 in the form of a lower case letter “a” which represents an outline of the character that is to be filled. The centermost image 102 (absent the illustrated black pixels 102a) is generated by a naive algorithm. This pixel pattern does not look much like a lowercase “a”. A simple dropout control mechanism can be added to the fill algorithm to turn on additional pixels to preserve the character's topology. The resultant pixels that are turned on by the dropout control mechanism are shown in black at 102a. The rightmost image 104 illustrates the work of an experienced hinter. It will be observed that the pixel pattern has been subtly altered to both improve readability and better preserve the character of the original outline.
The hinting process is not just about optimizing individual characters. The hinter must balance the needs of a single glyph with the desire for consistency across all the characters of a font. It is important, for example, to ensure that all the vertical stems of a font are the same number of pixels wide at a given size. If the scaling and rounding process produces one-pixel-wide stems on some characters and two-pixel-wide stems on others, then a passage of text will look blotchy and be difficult to read. The goal of the hinter is to produce a smooth transition from very high sizes, where merely filling the outlines suffices and hinting is unnecessary, down to lower sizes, where legibility must be preserved even when that means a departure from the outlines drawn by the original font designer.
Although the ever-improving resolution of hardcopy devices is beginning to approach the point at which hinting is not necessary, the technology is not there yet: 10- or 12-point text on a 300 or even 600 dpi printer still needs hinting for best results. More importantly, the increasing emphasis on reading text on-screen—from visions of the “paperless office” to the emergence and proliferation of hand-held computers and eBooks—means that more and more text is being viewed on devices in the 72–100 dpi range. Though resolutions of these displays are improving as well, for the foreseeable future hinting will be an absolute necessity in order to provide clear, legible text.
Although attempts have been made to design automated hinting systems in the past, even the best of these produce hints that are good, but still not up to the standards of professional typographers. Exemplary systems are described in the following references: Andler, Automatic generation of gridfitting hints for rasterization of outline fonts or graphics, Proceedings of the International Conference on Electronic Publishing, Document Manipulation, and Typography, pps. 221–234, September 1990, and Hersch, Character generation under grid constraints, Proceedings of SIGGRAPH 87, pps. 243–252, July 1987.
This previous work assumed that in order to be useful, an autohinter had to be a monolithic, self-contained package: outlines in, quality hints out. That is an admirable goal, and it may be achieved someday. However, given the detailed, aesthetically-based nature of the work, a better, more useful approach is to view the autohinter as one piece of a system that includes a human hinter.
There are two major font standards in widespread use today: Type 1 and TrueType. Type 1 fonts (Adobe Systems Inc., Adobe Type 1 Font Format, March 1990), often called “PostScript fonts,” were developed by Adobe and are popular in the world of publishing. Printing applications were the target when this system was developed, though utilities are now available to enable on-screen display of Type 1 fonts. The TrueType format (Apple Computer, Inc., The TrueType Font Format Specification, 1990, Version 1.0), originally developed by Apple, was intended to unify type on the screen and on paper, and is used in both the Macintosh and Windows operating systems. TrueType has something of a reputation for being of low quality, but this is mostly due to the fact that TrueType was always an open standard while Type 1 was not, and so the public domain is flooded with a large number of poorly designed, unhinted TrueType fonts. The TrueType standard does contain extensive facilities for high-quality hinting, though, and through the efforts of Monotype and other typography houses, more and more quality fonts are now available in the TrueType format.
Though both formats represent characters as spline-based outlines, the hinting styles are radically different. Hinting for Type 1 fonts works by marking sections of the outline as corresponding to particular typographic features of the character—stems, bowls, counters, and so on. It is the job of the rasterizer to take advantage of these hints about the character shape to produce the best possible pattern of pixels. This scheme has the advantage that enhancements to the rasterizer can produce improvements to all fonts on the system, but means that a designer of digital type cannot specify exactly what an outline will look like when rendered at a given size.
The TrueType font technology takes a different approach. Instead of leaving control over the glyph's final appearance to the rasterizer, a TrueType font contains explicit instructions (hints) about how particular control points should be shifted to fit the pixel grid. These instructions take the form of a program in a special, TrueType-specific bytecode language. Since both the behavior of each instruction and the rasterizing algorithm are defined in the TrueType standard, the designer of a TrueType font can predict exactly which pixels will be turned on for a character at a given size, no matter what type of output device is being used.
In TrueType, each contour of an outline is specified with a sequence of point positions (also referred to herein as “control points” or “knots”). FIG. 2 shows exemplary outline curves of the lowercase letter “a” for two fonts: Trebuchet and Frutiger. Each point is flagged as either “on-curve” or “off-curve”. TrueType defines the outline as follows:                Two successive on-curve points are connected with a straight line segment.        When an off-curve point falls between two on-curve points, the three are treated as the control points for a quadratic Bézier segment.        When two adjacent off-curve points appear, the midpoint of the segment connecting them is treated as an implicit on-curve point between them, allowing reduction to the case above.        
The glyph renderer starts by scaling the outlines to a particular size, then executes the attached program to shift control points around in a size-specific way before filling the altered outline. By itself, this approach cannot produce the necessary consistency among different characters of a font, or even between different parts of the same character, since each action is necessarily local. Global synchronization of outline alterations is achieved through use of a control value table, or CVT. The CVT is a shared table of distances, that can be referenced by instructions in each glyph's program. When the rendering is initialized for a given size, the values in the CVT are scaled and rounded to the current grid size. Point movements can then be constrained by CVT entries. For instance, a person writing hints for TrueType may decide to use CVT81 to represent, say, the width of vertical black stems in lowercase letters. He or she will then write instruction sequences for all appropriate lowercase letters, all referring to CVT entry 81, so that all the vertical black stems at a given size will have the same width.
The TrueType language is an assembly-style stack-based language. The intent of the designers of TrueType was not to make typographers learn and write in the TrueType language itself, but rather to facilitate the development of high-level languages and tools that generate TrueType code. The Visual TrueType (VTT) package from Microsoft is such a tool. VTT is described in detail in Stamm, A Graphical Method for Authoring Font Intelligence, Electronic Publishing, Raster Imaging, and Digital Typography, pps. 77–92, March/April 1998.
VTT provides a high-level language, called “VTT Talk”, for expressing relationships between points. VTT Talk provides statements for expressing the following classes of hints:                Link constraints: the vertical or horizontal distance between a pair of knots is constrained by an entry in the CVT.        Dist constraints: the “natural” vertical or horizontal distance between a pair of knots is maintained, so that if one point is moved the other moves in parallel.        Interpolate constraints: a knot's fractional distance between two parent knots is maintained.        Anchors: specific knots can be rounded to the nearest gridline, or to a gridline specified by a CVT entry.        
These types of hints are demonstrated visually for two characters from the Georgia Roman font in FIG. 3. There, the constraints are labeled for identification.
The VTT Talk hints are compiled into a TrueType program stored in the font file. One advantage of working with VTT Talk is that each statement simply asserts a relationship between two points, and there is little dependence on the order of the statements. If one statement is omitted, the meaning of the others is unchanged. In contrast, TrueType assembler is a sequential language that maintains a fairly complex state. Most instructions in TrueType have side effects that modify this state. If one tried to translate the assembler code directly, and were for some reason unable to translate a particular instruction—for instance, due to a sufficiently large difference in the matched glyphs' outlines—the effects of subsequent instructions could change entirely.
This invention arose out of concerns associated with improving the systems and methods through which hinting takes place. In particular, the invention arose out of concerns associated with improving TrueType hinting systems and tools.